package com.heima.platform.controller.v1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.platform.pojos.AdUser;
import com.heima.platform.mapper.AdUserMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author tmh
 * @date 2023/8/27 15:48
 * @description
 */
@RestController
public class TestController {

    @Resource
    private AdUserMapper adUserMapper;

    @GetMapping("/test")
    public String testPlatform() {
        return "hello , testPlatform";
    }

    @GetMapping("/list")
    public ResponseResult list() {
        List<AdUser> adUsers = adUserMapper.selectList(null);
        return ResponseResult.okResult(adUsers);
    }
}
